﻿@model MvcCmsWikiPlex.Models.ViewData.WikiModel

<div class="nav-cat">
    <h2 id="wikiSidebar" class="title">
        Wiki
    </h2>
    <ul class="sidebar-ul">
        <li>@Html.ActionLink("Wiki Home", "ViewWiki", new { slug = "" })</li>
        @if (Model._ShowEditLink)
        {
            <li><a id="editWikiContent" href="#">Edit Content</a> </li>
        }
        @if (Roles.IsUserInRole("Admin"))
        {
            <li>@Html.ActionLink("Manage Wiki", "ManageWiki") </li>
        }
    </ul>
    <div>
        @if (!string.IsNullOrEmpty(Model._WikiContent.WikiTitle.RestrictedToGroups))
        {
            <text>This title is restricted to user group(s): <strong>@Model._WikiContent.WikiTitle.RestrictedToGroups
            </strong>
            </text>
        }
    </div>
    <div id="wikiHistory">
        <table id="wikiHistoryPaginated" class="wikiHistorySidebar">
            <tbody>
            </tbody>
        </table>
        <div class="wikiPaging">
            <div>Showing <span id="from"></span>-<span id="to"></span> of <span id="total">@ViewData["HistoryCount"].ToString()</span>
            </div><a href="javascript:void(0);" onclick="GetHistory(-1)">Prev</a> <a href="javascript:void(0);"
                onclick="GetHistory(1)">Next</a></div>
    </div>
</div>
<br />
